﻿using System.Collections.Generic;
using System;

namespace IBE
{
    public class Optimize
    {
        #region Members
        //1
        string _RecType = "";
        public string RecType { get { return _RecType; } set { _RecType = value; } }
        //2
        List<string> _KlrID=new List<string>();
        public List<string> KlrID { get { return _KlrID; } set { _KlrID = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<Optimize>";
            xml += "<RecType>" + _RecType + "</RecType>";
            xml += "<KlrIDAry>";
            foreach (string klrID in _KlrID)
            {
                xml += "<KlrID>" + klrID + "</KlrID>";
            }
            xml += "</KlrIDAry>";
            xml += "</Optimize>";
            return xml;
        }
        #endregion
    }

    public class TicketingInfo
    {
        #region Members
        //1
        string _UniqueKey = "";
        public string UniqueKey { get { return _UniqueKey; } set { _UniqueKey = value; } }
        //2
        string _TICReq = "";
        public string TICReq { get { return _TICReq; } set { _TICReq = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<TicketingInfo>";
            if (_UniqueKey != "") { xml += "<UniqueKey>" + _UniqueKey + "</UniqueKey>"; }
            if (_TICReq != "") { xml += "<TICReq>" + _TICReq + "</TICReq>"; }
            xml += "</TicketingInfo>";
            return xml;
        }
        #endregion
    }

    public class ClassPreference
    {
        public struct ODPair
        {
            public string ODNum;
            public string ClassPref;
        };

        #region Members
        //1
        List<ODPair> _ODPairAry = new List<ODPair>();
        public List<ODPair> ODPairAry { get { return _ODPairAry; } set { _ODPairAry = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<ClassPreference>";
            xml += "<ODPairAry>";
            foreach (ODPair oDPair in _ODPairAry)
            {
                xml += "<ODPair>";
                xml += "<ODNum>" + oDPair.ODNum + "</ODNum>";
                xml += "<ClassPref>" + oDPair.ClassPref + "</ClassPref>";
                xml += "</ODPair>";
            }
            xml += "</ODPairAry>";
            xml += "</ClassPreference>";
            return xml;
        }
        #endregion
    }

    public class ClassPrefs
    {
        public struct ODPair
        {
            public string ODNum;
            public string ClassPref;
        };

        #region Members
        //1
        List<ODPair> _ODPairAry = new List<ODPair>();
        public List<ODPair> ODPairAry { get { return _ODPairAry; } set { _ODPairAry = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<ClassPrefs>";
            xml += "<ODPairAry>";
            foreach (ODPair oDPair in _ODPairAry)
            {
                xml += "<ODPair>";
                xml += "<ODNum>" + oDPair.ODNum + "</ODNum>";
                xml += "<ClassPref>" + oDPair.ClassPref + "</ClassPref>";
                xml += "</ODPair>";
            }
            xml += "</ODPairAry>";
            xml += "</ClassPrefs>";
            return xml;
        }
        #endregion
    }

    public class GenFarePrefs
    {
        #region Members
        //1
        string _Pen = "";
        public string Pen { get { return _Pen; } set { _Pen = value; } }
        //2
        string _MinStay = "";
        public string MinStay { get { return _MinStay; } set { _MinStay = value; } }
        //3
        string _MaxStay = "";
        public string MaxStay { get { return _MaxStay; } set { _MaxStay = value; } }
        //4
        string _AP = "";
        public string AP { get { return _AP; } set { _AP = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<GenFarePrefs>";
            if (_Pen != "") { xml += "<Pen>" + _Pen + "</Pen>"; }
            if (_MinStay != "") { xml += "<MinStay>" + _MinStay + "</MinStay>"; }
            if (_MaxStay != "") { xml += "<MaxStay>" + _MaxStay + "</MaxStay>"; }
            if (_AP != "") { xml += "<AP>" + _AP + "</AP>"; }
            xml += "</GenFarePrefs>";
            return xml;
        }
        #endregion
    }

    public class MaxFare
    {
        #region Members
        //1
        string _Amt = "";
        public string Amt { get { return _Amt; } set { _Amt = value; } }
        //2
        string _Currency = "";
        public string Currency { get { return _Currency; } set { _Currency = value; } }
        //3
        string _DecPos = "";
        public string DecPos { get { return _DecPos; } set { _DecPos = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<MaxFare>";
            if (_Amt != "") { xml += "<Amt>" + _Amt + "</Amt>"; }
            if (_Currency != "") { xml += "<Currency>" + _Currency + "</Currency>"; }
            if (_DecPos != "") { xml += "<DecPos>" + _DecPos + "</DecPos>"; }
            xml += "</MaxFare>";
            return xml;
        }
        #endregion
    }

    public class PsgrMods
    {
        public struct Psgr
        {
            public string LNameNum;
            public string PsgrNum;
            public string AbsNameNum;
            public string PIC;
            public string TIC;
        };

        #region Members
        //1
        List<Psgr> _PsgrAry = new List<Psgr>();
        public List<Psgr> PsgrAry { get { return _PsgrAry; } set { _PsgrAry = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<PsgrMods>";
            xml += "<PsgrAry>";
            foreach (Psgr psgr in _PsgrAry)
            {
                xml += "<Psgr>";
                xml += "<LNameNum>" + psgr.LNameNum + "</LNameNum>";
                xml += "<PsgrNum>" + psgr.PsgrNum + "</PsgrNum>";
                xml += "<AbsNameNum>" + psgr.AbsNameNum + "</AbsNameNum>";
                xml += "<PIC>" + psgr.PIC + "</PIC>";
                xml += "<TIC>" + psgr.TIC + "</TIC>";
                xml += "</Psgr>";
            }
            xml += "</PsgrAry>";
            xml += "</PsgrMods>";
            return xml;
        }
        #endregion
    }

    public class PFInfo
    {
        public struct PF
        {
            public string StartODRange;
            public string EndODRange;
            public string CRS;
            public string PCC;
            public string AirV;
            public string Acct;
            public string Contract;
            public string PublishedFaresInd;
            public string Type;
            public string PFTypeRestrict;
            public string AcctCodeRestrict;
            public string Spare1;
        };

        #region Members
        //1
        string _ReqAirVPFs = "";
        public string ReqAirVPFs { get { return _ReqAirVPFs; } set { _ReqAirVPFs = value; } }

        //2
        List<PF> _PFAry = new List<PF>();
        public List<PF> PFAry { get { return _PFAry; } set { _PFAry = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<PFInfo>";
            xml += "<ReqAirVPFs>" + _ReqAirVPFs + "</ReqAirVPFs>";
            xml += "<PFAry>";
            foreach (PF pf in _PFAry)
            {
                xml += "<PF>";
                xml += "<StartODRange>" + pf.StartODRange + "</StartODRange>";
                xml += "<EndODRange>" + pf.EndODRange + "</EndODRange>";
                xml += "<CRS>" + pf.CRS + "</CRS>";
                xml += "<PCC>" + pf.PCC + "</PCC>";
                xml += "<AirV>" + pf.AirV + "</AirV>";
                xml += "<Acct>" + pf.Acct + "</Acct>";
                xml += "<Contract>" + pf.Contract + "</Contract>";
                xml += "<PublishedFaresInd>" + pf.PublishedFaresInd + "</PublishedFaresInd>";
                xml += "<Type>" + pf.Type + "</Type>";
                xml += "<PFTypeRestrict>" + pf.PFTypeRestrict + "</PFTypeRestrict>";
                xml += "<AcctCodeRestrict>" + pf.AcctCodeRestrict + "</AcctCodeRestrict>";
                xml += "<Spare1>" + pf.Spare1 + "</Spare1>";
                xml += "</PF>";
            }
            xml += "</PFAry>";
            xml += "</PFInfo>";
            return xml;
        }
        #endregion
    }

    public class PassengerType
    {
        public struct Psgr
        {
            public string LNameNum;
            public string PsgrNum;
            public string AbsNameNum;
            public string PTC;
            public string Age;
            public string PricePTCOnly;
            public string DiscOrIncrInd;
            public string AmtOrPercent;
            public string PersonalGeoType;
            public string PersonalGeoData;
            public string TIC;
            public string TkDesignator;
            public string TkCode;
        };

        #region Members
        //1
        List<Psgr> _PsgrAry = new List<Psgr>();
        public List<Psgr> PsgrAry { get { return _PsgrAry; } set { _PsgrAry = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<PassengerType>";
            xml += "<PsgrAry>";
            foreach (Psgr psgr in _PsgrAry)
            {
                xml += "<Psgr>";
                xml += "<LNameNum>" + psgr.LNameNum + "</LNameNum>";
                xml += "<PsgrNum>" + psgr.PsgrNum + "</PsgrNum>";
                xml += "<AbsNameNum>" + psgr.AbsNameNum + "</AbsNameNum>";
                xml += "<PTC>" + psgr.PTC + "</PTC>";
                xml += "<Age>" + psgr.Age + "</Age>";
                xml += "<PricePTCOnly>" + psgr.PricePTCOnly + "</PricePTCOnly>";
                xml += "<DiscOrIncrInd>" + psgr.DiscOrIncrInd + "</DiscOrIncrInd>";
                xml += "<AmtOrPercent>" + psgr.AmtOrPercent + "</AmtOrPercent>";
                xml += "<PersonalGeoType>" + psgr.PersonalGeoType + "</PersonalGeoType>";
                xml += "<PersonalGeoData>" + psgr.PersonalGeoData + "</PersonalGeoData>";
                xml += "<TIC>" + psgr.TIC + "</TIC>";
                xml += "<TkDesignator>" + psgr.TkDesignator + "</TkDesignator>";
                xml += "<TkCode>" + psgr.TkCode + "</TkCode>";
                xml += "</Psgr>";
            }
            xml += "</PsgrAry>";
            xml += "</PassengerType>";
            return xml;
        }
        #endregion
    }

    public class PlatingAirVMods
    {
        #region Members
        //1
        string _PlatingAirV = "";
        public string PlatingAirV { get { return _PlatingAirV; } set { _PlatingAirV = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<PlatingAirVMods>";
            xml += "<PlatingAirV>" + _PlatingAirV + "</PlatingAirV>";
            xml += "</PlatingAirVMods>";
            return xml;
        }
        #endregion
    }

    public class FqPicOnly
    {
        public struct Psgr
        {
            public string LNameNum;
            public string PsgrNum;
            public string AbsNameNum;
            public string PIC;
            public string TIC;
        };

        #region Members
        //1
        List<Psgr> _PsgrAry = new List<Psgr>();
        public List<Psgr> PsgrAry { get { return _PsgrAry; } set { _PsgrAry = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<FqPicOnly>";
            xml += "<PsgrAry>";
            foreach (Psgr psgr in _PsgrAry)
            {
                xml += "<Psgr>";
                xml += "<LNameNum>" + psgr.LNameNum + "</LNameNum>";
                xml += "<PsgrNum>" + psgr.PsgrNum + "</PsgrNum>";
                xml += "<AbsNameNum>" + psgr.AbsNameNum + "</AbsNameNum>";
                xml += "<PIC>" + psgr.PIC + "</PIC>";
                xml += "<TIC>" + psgr.TIC + "</TIC>";
                xml += "</Psgr>";
            }
            xml += "</PsgrAry>";
            xml += "</FqPicOnly>";
            return xml;
        }
        #endregion
    }

    public class GenQuoteInfo
    {
        #region Members
        //1
        string _SellCity = "";
        public string SellCity { get { return _SellCity; } set { _SellCity = value; } }
        //2
        string _TktCity = "";
        public string TktCity { get { return _TktCity; } set { _TktCity = value; } }
        //3
        string _AltCurrency = "";
        public string AltCurrency { get { return _AltCurrency; } set { _AltCurrency = value; } }
        //4
        string _EquivCurrency = "";
        public string EquivCurrency { get { return _EquivCurrency; } set { _EquivCurrency = value; } }
        //5
        string _TkDt = "";
        public string TkDt { get { return _TkDt; } set { _TkDt = value; } }
        //6
        string _BkDtOverride = "";
        public string BkDtOverride { get { return _BkDtOverride; } set { _BkDtOverride = value; } }
        //7
        string _EUROverride = "";
        public string EUROverride { get { return _EUROverride; } set { _EUROverride = value; } }
        //8
        string _LCUOverride = "";
        public string LCUOverride { get { return _LCUOverride; } set { _LCUOverride = value; } }
        //9
        string _TkType = "";
        public string TkType { get { return _TkType; } set { _TkType = value; } }
        //10
        string _AltCitiesRequired = "";
        public string AltCitiesRequired { get { return _AltCitiesRequired; } set { _AltCitiesRequired = value; } }
        //11
        string _AltDatesRequired = "";
        public string AltDatesRequired { get { return _AltDatesRequired; } set { _AltDatesRequired = value; } }
        //12
        string _NetFaresOnly = "";
        public string NetFaresOnly { get { return _NetFaresOnly; } set { _NetFaresOnly = value; } }
        //13
        string _TkAgncyPCC = "";
        public string TkAgncyPCC { get { return _TkAgncyPCC; } set { _TkAgncyPCC = value; } }
        //14
        string _RulesProcess = "";
        public string RulesProcess { get { return _RulesProcess; } set { _RulesProcess = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<GenQuoteInfo>";
            if (_SellCity != "") { xml += "<SellCity>" + _SellCity + "</SellCity>"; }
            if (_TktCity != "") { xml += "<TktCity>" + _TktCity + "</TktCity>"; }
            if (_AltCurrency != "") { xml += "<AltCurrency>" + _AltCurrency + "</AltCurrency>"; }
            if (_EquivCurrency != "") { xml += "<EquivCurrency>" + _EquivCurrency + "</EquivCurrency>"; }
            if (_TkDt != "") { xml += "<TkDt>" + _TkDt + "</TkDt>"; }
            if (_BkDtOverride != "") { xml += "<BkDtOverride>" + _BkDtOverride + "</BkDtOverride>"; }
            if (_EUROverride != "") { xml += "<EUROverride>" + _EUROverride + "</EUROverride>"; }
            if (_LCUOverride != "") { xml += "<LCUOverride>" + _LCUOverride + "</LCUOverride>"; }
            if (_TkType != "") { xml += "<TkType>" + _TkType + "</TkType>"; }
            if (_AltCitiesRequired != "") { xml += "<AltCitiesRequired>" + _AltCitiesRequired + "</AltCitiesRequired>"; }
            if (_AltDatesRequired != "") { xml += "<AltDatesRequired>" + _AltDatesRequired + "</AltDatesRequired>"; }
            if (_NetFaresOnly != "") { xml += "<NetFaresOnly>" + _NetFaresOnly + "</NetFaresOnly>"; }
            if (_TkAgncyPCC != "") { xml += "<TkAgncyPCC>" + _TkAgncyPCC + "</TkAgncyPCC>"; }
            if (_RulesProcess != "") { xml += "<RulesProcess>" + _RulesProcess + "</RulesProcess>"; }
            xml += "</GenQuoteInfo>";
            return xml;
        }
        #endregion
    }

    public class ShopServiceValues
    {
        #region Members
        //1
        string _NumSolutions = "";
        public string NumSolutions { get { return _NumSolutions; } set { _NumSolutions = value; } }
        //2
        string _ShopValueFunc = "";
        public string ShopValueFunc { get { return _ShopValueFunc; } set { _ShopValueFunc = value; } }
        //3
        string _PriceRegardless = "";
        public string PriceRegardless { get { return _PriceRegardless; } set { _PriceRegardless = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<ShopServiceValues>";
            if (_NumSolutions != "") { xml += "<NumSolutions>" + _NumSolutions + "</NumSolutions>"; }
            if (_ShopValueFunc != "") { xml += "<ShopValueFunc>" + _ShopValueFunc + "</ShopValueFunc>"; }
            if (_PriceRegardless != "") { xml += "<PriceRegardless>" + _PriceRegardless + "</PriceRegardless>"; }
            xml += "</ShopServiceValues>";
            return xml;
        }
        #endregion
    }

    public class TaxExemptMods
    {
        public struct ExemptCountry
        {
            public string ExemptAllTaxes;
            public string Country;
        };

        #region Members
        //1
        List<ExemptCountry> _ExemptCountryAry = new List<ExemptCountry>();
        public List<ExemptCountry> ExemptCountryAry { get { return _ExemptCountryAry; } set { _ExemptCountryAry = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<TaxExemptMods>";
            xml += "<ExemptCountryAry>";
            foreach (ExemptCountry exemptCountryAry in _ExemptCountryAry)
            {
                xml += "<ExemptCountry>";
                xml += "<ExemptAllTaxes>" + exemptCountryAry.ExemptAllTaxes + "</ExemptAllTaxes>";
                xml += "<Country>" + exemptCountryAry.Country + "</Country>";
                xml += "</ExemptCountry>";
            }
            xml += "</ExemptCountryAry>";
            xml += "</TaxExemptMods>";
            return xml;
        }
        #endregion
    }

    public class WaiverMods
    {
        #region Members
        //1
        string _WaiverCode = "";
        public string WaiverCode { get { return _WaiverCode; } set { _WaiverCode = value; } }
        #endregion

        #region Method
        public string GetXml()
        {
            string xml = "<WaiverMods>";
            xml += "<WaiverCode>" + _WaiverCode + "</WaiverCode>";
            xml += "</WaiverMods>";
            return xml;
        }
        #endregion
    }
}